package zabbix

import (
	"fmt"
)

func Mains()  {
	//定义url，zabbix登陆使用的用户名及密码
	url := "http://192.168.73.160/api_jsonrpc.php"
	user := "Admin"
	password := "zabbix"

	//resultdata,api := ApplicationGets(url,user,password)
	//resultdata,api := ActionCreate(url,user,password)
	//resultdata,api := ActionGet(url,user,password)
	//resultdata,api := HostCreate(url,user,password)
	resultdata,api := HostGet(url,user,password)
	//resultdata,api := ApiinfoVersion(url,user,password)

	defer api.LogOut()

	fmt.Println(resultdata)
	//ddd := resultdata.([]interface{})
	//fmt.Println(ddd)
	//for _,dd := range ddd {
	//	dds := dd.(map[string]interface{})
	//	fmt.Println(dds["applicatinid"],dds["flags"],dds["name"],dds["templateids"])
	//}



}






